<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>好室友计算平台</title>

<!-- Bootstrap -->
<link href="<%=request.getContextPath()%>/static/css/bootstrap.min.css"
	rel="stylesheet">
<link
	href="<%=request.getContextPath()%>/static/css/bootstrap-theme.min.css"
	rel="stylesheet">
<link href="<%=request.getContextPath()%>/static/css/jumbotron.css"
	rel="stylesheet">
<link href="<%=request.getContextPath()%>/static/css/font-awesome.min.css"
	rel="stylesheet">

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
      <script src="<%=request.getContextPath()%>/static/js/html5shiv.min.js"></script>
      <script src="<%=request.getContextPath()%>/static/js/respond.min.js"></script>
    <![endif]-->
<style>
td {
	text-align: center;
}
</style>
</head>

<body>
	<jsp:include page="../Common/navHeader.jsp"></jsp:include>


	<div class="container">
		<h1 style="font-family: 华文行楷;">好室友计算平台</h1>
		<br> <br>
		<div class="row">
			<div class="col-sm-2"></div>
			<div class="col-sm-8">
				<form method="POST">
					<table class="table table-hover table-stripped">
						<tr style="background: aliceblue;">
							<td>计算任务名称</td>
							<td>上次开始时间</td>
							<td>上次结束时间</td>
							<td>上次用时</td>
							<td>操作</td>
						</tr>
						<tr>
							<td>用户信息聚类计算</td>
							<!-- 空闲 -->
							<c:if test="${!isKmeansBusy }">
								<td>${kmeansStartDate }</td>
								<td>${kmeansCompleteDate }</td>
							</c:if>
							<!-- 忙碌：未开始 -->
							<c:if test="${isKmeansBusy && !kmeansStaredIndeed }">
								<td colspan="2">即将开始</td>
							</c:if>
							<!-- 忙碌：已开始 -->
							<c:if test="${isKmeansBusy && kmeansStaredIndeed }">
								<td>${kmeansStartDate }</td>
								<td><i class="fa fa-spinner fa-spin fa-fw" aria-hidden="true"></i></td>
							</c:if>
							<td>
							  <c:if test="${kmeansTimeSpan >= 0 }">
							  ${kmeansTimeSpan}s
							  </c:if>
							</td>
							<td>
								<button name="startgroup" type="submit" class="btn btn-success">执行聚类</button>
							</td>
						</tr>
						<tr>
							<td>宿舍偏爱学习计算</td>
							<!-- 空闲 -->
							<c:if test="${!isBackPropagationDeepBusy }">
								<td>${backPropagationDeepStartDate }</td>
								<td>${backPropagationDeepCompleteDate }</td>
							</c:if>
							<!-- 忙碌：未开始 -->
							<c:if test="${isBackPropagationDeepBusy && !backPropagationDeepStaredIndeed }">
								<td colspan="2">即将开始</td>
							</c:if>
							<!-- 忙碌：已开始 -->
							<c:if test="${isBackPropagationDeepBusy && backPropagationDeepStaredIndeed }">
								<td>${backPropagationDeepStartDate }</td>
								<td><i class="fa fa-spinner fa-spin fa-fw" aria-hidden="true"></i></td>
							</c:if>
							<td>
							  <c:if test="${backPropagationDeepTimeSpan >= 0 }">
							  ${backPropagationDeepTimeSpan}s
							  </c:if>
							</td>
							<td>
								<button name="startpredict" type="submit" class="btn btn-success">执行学习</button>
							</td>
						</tr>

					</table>
				</form>
			</div>
			<div class="col-sm-2"></div>
		</div>
		<!--<div class="row">-->

		<jsp:include page="../Common/Footer.jsp"></jsp:include>

	</div>
	<!--<div class="jumbotron">-->

	<script src="<%=request.getContextPath()%>/static/js/jquery.min.js"></script>
    <script src="<%=request.getContextPath() %>/static/js/bootstrap.min.js"></script> 
	<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
	<script src="<%=request.getContextPath()%>/static/js/ie10-viewport-bug-workaround.js"></script>


</body>
</html>
